import Vue from 'vue'
import Router from 'vue-router'
 
Vue.use(Router)


const routers =  new Router ({
    mode: 'history',  // 此处只能够使用history路由，不然，无法跳转到微应用界面。history发布到服务器端必须配合后端的设置
    base: '/',
    routes: [
        {
            path: '/',
            component: () => import('@/pages/index.vue'),
            children: [
                {
                    path: '/',
                    component: () => import('@/pages/home.vue'),
                    children: [
                        {
                            path: '/',
                            component: () => import('@/pages/main.vue'),
                        },
                        {
                            path: '/menu1',
                            component: () => import('@/pages/menu1.vue')
                        },
                        {
                            path: '/menu2',
                            component: () => import('@/pages/menu2.vue')
                        }
                    ]
                },
                {
                    path: '/app1',
                    name: 'app1'
                },
                {
                    path: '/app2',
                    name: 'app2',
                },
                {
                    path: '/app3',
                    name: 'app3',
                }
            ]
        }
    ]
})

export default routers